home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 4.iso
/
public
/
plan
/
src
/
Makefile.irix4
< prev
next >
Wrap
Makefile
|
1994-08-01
|
5KB
|
144 lines
#
# installation directories. DIR contains the main interactive plan program,
# LIB contains everything else (pland, notifier, plan.help). If you change
# either, remove lock.o. INCDIR is for searching nonstandard include
# directories, eg. "-I/usr/X11R5". ALWAYS TERMINATE macro assignments with #.
# DO NOT put a blank between the path and the #, or you'll get compile errors.
#
DIR = /usr/local/bin# # user-callable executable (plan)
LIB = /usr/local/bin# # auxiliary executables (pland, notifier)
HELP = $(LIB)# # help file (plan.help)
MAN = /usr/man/local/man# # unformatted nroff manpage (plan.[14])
CATMAN = /usr/catman/local/cat# # formatted manpage (plan.[14])
INCDIR =# # extra cc options, e.g. "-I/var/include"
CPP_PATH="/lib/cpp -P -I$(HELP)"# used by plan to pre-process holiday files,
# # plan will check if this file really exists
# JAPAN = -DJAPAN# # uncomment this for Japanese version of plan
# # JAPAN requires X11R5 and a Japanese env.
#DEBUG = -g
DEBUG = -O2 -s
CFLAGS =
L1FLAGS = -lXm_s -lXt_s -lXmu -lX11_s -lPW -lsun
L2FLAGS = -lsun -lc_s
all: plan pland notifier
help:
@echo "Usage:"
@echo " make compile for SGI systems"
@echo " make install install compiled programs in"
@echo " $(DIR) and $(LIB)."
@echo " make clean remove everything in this dir except sources"
@echo ""
@echo "If you have problems, first read this Makefile. You may also"
@echo "want to change the installation directory if you are not root."
@echo "The installation directory is set at the top of this Makefile."
@echo "For a Japanese version, edit the JAPAN line in the Makefile."
INC = bm_advance.h bm_blank.h bm_group.h bm_icon.h bm_iconsub.h\
bm_private.h bm_message.h bm_noticon.h bm_recycle.h bm_script.h\
bm_tri.h cal.h conf.h notifier.h version.h resources.h print_res.h
P_SRC = main.c popup.c print.c gotomenu.c\
calmenu.c monmenu.c mondraw.c\
daymenu.c daydraw.c dayedit.c\
msgmenu.c cycmenu.c cyccalc.c advmenu.c keymenu.c\
cnfmenu.c yearmenu.c yeardraw.c holmenu.c adjmenu.c\
weekmenu.c weekdraw.c weekcalc.c usermenu.c rangemenu.c\
pixmap.c help.c dbase.c file_r.c file_w.c convert.c\
lock.c time.c sublist.c parser.y parser.lex holiday.c
P_OBJ = main.o popup.o print.o gotomenu.o\
calmenu.o monmenu.o mondraw.o\
daymenu.o daydraw.o dayedit.o\
msgmenu.o cycmenu.o cyccalc.o advmenu.o keymenu.o\
cnfmenu.o yearmenu.o yeardraw.o holmenu.o adjmenu.o\
weekmenu.o weekdraw.o weekcalc.o usermenu.o rangemenu.o\
pixmap.o help.o dbase.o file_r.o file_w.o convert.o\
lock.o time.o sublist.o parser.o lex.yy.o holiday.o
D_SRC = daemon.c dbase.c file_r.c lock.c time.c cyccalc.c
D_OBJ = daemon.o dbase.o file_r.o lock.o time.o cyccalc.o
N_SRC = notifier.c notmenu.c
N_OBJ = notifier.o notmenu.o
plan: $(P_OBJ)
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -o plan $(P_OBJ) $(L1F)
pland: $(D_OBJ)
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -o pland $(D_OBJ) $(L2F)
notifier: $(N_OBJ)
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -o notifier $(N_OBJ) $(L1F)
.c.o:
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -c $<
print.o: print.c
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -c -DLIB=\"$(LIB)\" $<
holiday.o: holiday.c
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -DCPP_PATH=\"$(CPP_PATH)\" -c -DLIB=\"$(LIB)\" $<
lock.o: lock.c
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -c -DPATH=\"$(DIR):$(LIB):$(HELP)\" $<
parser.c: parser.y
yacc -d parser.y
-mv y.tab.c parser.c
lex.yy.o: lex.yy.c parser.c
$(MYCC) $(DEBUG) $(CF) $(JAPAN) $(INCDIR) -c lex.yy.c
lex.yy.c: parser.lex
lex parser.lex
$(P_OBJ): conf.h cal.h
$(D_OBJ): conf.h
$(N_OBJ): notifier.h
main.o popup.o daemon.o notifier.o: version.h
main.o: resources.h print_res.h
#---------------------------------------------------------------
install:
cp plan $(DIR)
cp pland notifier plan_cal.ps $(LIB)
cp plan.help $(HELP)
-strip $(DIR)/plan $(LIB)/pland $(LIB)/notifier
-chmod 755 $(DIR)/plan $(LIB)/pland $(LIB)/notifier
-chmod 644 $(HELP)/plan.help
-test -x `which nroff` && nroff -man plan.1 >plan.1cat
-test -x `which nroff` && nroff -man plan.4 >plan.4cat
-test -d $(MAN)1 && cp plan.1 $(MAN)1/plan.1
-test -d $(MAN)4 && cp plan.4 $(MAN)4/plan.4
-test -d $(CATMAN)1 && cp plan.1cat $(CATMAN)1/plan.1
-test -d $(CATMAN)4 && cp plan.4cat $(CATMAN)4/plan.4
-test -f ${HOME}/.holiday || cp holiday_german ${HOME}/.holiday
-test `uname` = IRIX && mkdir $$HOME/.icons
-test `uname` = IRIX && cp Plan.icon $$HOME/.icons/Plan.icon
@echo ""
@echo "use holiday_* as templates for your ~/.holiday file"
clean:
-rm -f *.o
-rm -f y.tab.h parser.c lex.yy.c
-rm -f core plan pland notifier tags
#---------------------------------------------------------------
LIST = README HISTORY plan.1cat plan.4cat plan.1 plan.4 plan.help\
Makefile Mkdoc Mkdoc.nawk Killpland $(P_SRC) daemon.c $(N_SRC)\
$(INC) holiday_canada holiday_dutch holiday_french holiday_frswiss\
holiday_german holiday_uk holiday_us holiday_swedish holiday_japan\
holiday_spain holiday_quebec holiday_bavarian Monochrome plan_cal.ps\
Plan.icon
shar:
shar -n plan -a -M -o plan.shar -L 60 $(LIST)